<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>

</html>
<script>
    function deepclone(obj) {
        if (obj !== 'object' || obj == null) {
            return obj
        }
        let arr
        if (obj instanceof Array) {
            arr = []
        } else {
            arr = {}
        }
        for (let key in obj) {
            if (obj.hanOwnproperty(key)) {
                arr[key] = deepclone(obj[key])
            }
        }
        return arr
    }
</script>